#include "contactlistwidget.h"
#include "ui_contactlistwidget.h"
#include <QFile>
#include <QStyleOption>

ContactListWidget::ContactListWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::ContactListWidget)
{
    ui->setupUi(this);
    int listContactOffsetY = 60;
    ui->listContact->setGeometry(QRect(0, listContactOffsetY, this->width(), this->height()));
    int xOffset = 20;
    int yOffset = 19;
    ui->inputSearchFriend->move(xOffset, yOffset);
    xOffset = 150;
    ui->btnSearch->move(xOffset, yOffset);
}

ContactListWidget::~ContactListWidget()
{
    delete ui;
}

QListWidget* ContactListWidget::getListContact() const
{
    return ui->listContact;
}

void ContactListWidget::resizeEvent(QResizeEvent *event)
{
    Q_UNUSED(event);
    ui->listContact->setGeometry(QRect(0, ui->listContact->y(), this->width(), this->height()));
}
